package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)


//计算两个大数相加的和，这两个大数会超过int64的表示范围

func main() {
	reader := bufio.NewReader(os.Stdin)
	result, _, err := reader.ReadLine()

	if err != nil {
		fmt.Println("read from console err:", err)
	}

	strSlice := strings.Split(string(result), "+")
	if len(strSlice) != 2 {
		fmt.Println("please input a+b")
		return
	}

	strNumber1 := strings.TrimSpace(strSlice[0])
	strNumber2 := strings.TrimSpace(strSlice[1])

	fmt.Println(muti(strNumber1, strNumber2))

}

func muti(s string, s2 string) (result string) {
	if len(s) == 0 && len(s2) == 0 {
		result = "0"
		return
	}

	var index1 = len(s) - 1
	var index2 = len(s2) - 1
	var digit int

	for index1 >= 0 && index2 >= 0 {
		c1 := s[index1] - '0'
		c2 := s2[index2] - '0'
		sum := int(c1) + int(c2) + digit

		if sum >= 10 {
			digit = 1
		} else {
			digit = 0
		}
		
		c3 := (sum % 10) + '0'

		result = fmt.Sprintf("%c%s", c3, result)
		index1 --
		index2--
	}

	for index1 >= 0 {
		c1 := s[index1] - '0'
		sum := int(c1) + digit
		if sum >= 10 {
			digit = 1
		} else {
			digit = 0
		}
		c3 := (sum % 10) + '0'
		result = fmt.Sprintf("%c%s", c3, result)
		index1 --
	}

	for index2 >= 0 {
		c2 := s2[index2] - '0'
		sum := int(c2) + digit
		if sum >= 10 {
			digit = 1
		} else {
			digit = 0
		}
		c3 := (sum % 10) + '0'
		result = fmt.Sprintf("%c%s", c3, result)
		index2 --
	}

	if digit == 1 {
		result = fmt.Sprintf("%c%s", 1, result)
	}
	return
}
